package com.example.exintent2;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Activity_con extends Activity {
	TextView txt2;
	EditText ed3,ed4;
	int kq3;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_con);
		txt2=(TextView) findViewById(R.id.txt2);
		ed3=(EditText) findViewById(R.id.ed3);
		ed4=(EditText) findViewById(R.id.ed4);
		Intent kq = getIntent();
		int kq1= kq.getIntExtra("num1", 0);
		int kq2= kq.getIntExtra("num2", 0);
		 kq3=kq1+kq2;
		txt2.setText(""+kq3);

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_con, menu);
		return true;

	}
	public void name() {

	}
	public void send_far(View v) {
		Intent sen =getIntent();
		int a1= Integer.parseInt(ed3.getText().toString());
		int a2=kq3-a1;
		String nope= ed4.getText().toString();
		sen.putExtra("con", a2);
		sen.putExtra("lydo", nope);
		setResult(112, sen);
		finish();
	}
}
